package com.zx.designpattern.model.bean;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.zx.designpattern.utils.ListUtils;
import com.zx.designpattern.utils.StringUtils;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

/**
 * 诗词对象
 *
 * @author Administrator
 */
@JsonIgnoreProperties(ignoreUnknown = true)//可忽略多余字段
public class DiyPoemMod implements Serializable {
    private String id; // 主键
    private Integer userId; // 外键 诗人id
    private String title; // 标题
    private String content; // 内容
    private String url; // 图片地址
    private Integer isPublish; //是否公开
    private String creatTime;// 发布时间
    private String tag; //标签
    private int type; //类型0:普通诗词，只有一张图片	1:图文混编诗词，content存储的是json
    private int status; //状态
    private User user;
    private int likeNum; //点赞次数
    public int isLike;//是否点赞

    public int getLikeNum() {
        return likeNum;
    }

    public void setLikeNum(int likeNum) {
        this.likeNum = likeNum;
    }

    public User getUser() {
        return user;
    }

    public void setUser(User user) {
        this.user = user;
    }

    public String getTag() {
        return tag;
    }

    public void setTag(String tag) {
        this.tag = tag;
    }

    public int getType() {
        return type;
    }

    public void setType(int type) {
        this.type = type;
    }

    public int getStatus() {
        return status;
    }

    public void setStatus(int status) {
        this.status = status;
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public Integer getUserId() {
        return userId;
    }

    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    public String getCreatTime() {
        return creatTime;
    }

    public void setCreatTime(String creatTime) {
        this.creatTime = creatTime;
    }

    public Integer getIsPublish() {
        return isPublish;
    }

    public void setIsPublish(Integer isPublish) {
        this.isPublish = isPublish;
    }

    public String getPenName() {
        if (user != null) {
            return user.getPenName();
        } else {
            return "无名氏";
        }
    }



}
